<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/common_setting_unit.php"); ?>


<?php include_once("detail-list-function.php"); ?>
<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/script/site-function.php"); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php include_once('../modules/head.php'); ?>




</head>

<body>

<div id="topbar">
    <!--TopBar端點01-->
    <?php include '../modules/topbar.php'; ?>
    <!--TopBar端點02-->
</div>

<div id="container">
    <!--Container端點01-->
    <div id="maincontent">
        <!--maincontent端點01-->

        <div id="sidebar">
            <?php include '../modules/sidebar.php'; ?>
        </div>


        <div id="content">
         
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend><h1>热门评论</h1></legend>
            </fieldset>

            <div class="list-box">

                <div class="list-boxes">
					 <table class="layui-table">
                        <colgroup>
                            <col width="80">
                            <col width="760">
                          
                            <col width="260">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>编号</th>
                            
                            <th>资料</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                    <?php for ($i = 0; $i < $detailnum; $i++) {?>
                    		<tr>
                            	<td><?echo $i+1?></td>
                                <td>
                                	<div class="list-boxing-content">
                                <label>评论内容：</label>
                                <div><?php echo $detail_content[$i] ?></div>
                            </div>

                            		<ul class="list-boxing-data">
                                <li class="title-name">
                                    <label>评论状态：</label><?php if($detail_status[$i]=='0'){echo '<span style="color: #F00;">未审核</span>';}else{echo '已显示';} ?>
                                </li>
                                <li>
                                    <label>评论人：</label><?php echo $detail_name[$i] ?>
                                </li>
                                <li>
                                    <label>评论时间：</label><?php echo $detail_time[$i] ?>
                                </li>
                                <li style="display: none;">
                                    <label>所属板块：</label><?php echo $detail_belong[$i] ?>
                                </li>
                                <li style="display: none;">
                                    <label>所属内容ID：</label><?php echo $detail_belong_id[$i] ?>
                                </li>
                            </ul>
                            	</td>
                                <td> 
                              
                                    <a href="javascript:void(0)" onclick="popupBox(<?php echo $detail_nid[$i] ?>)" class="delete layui-btn  layui-btn-sm" > <i class="layui-icon">&#xe640;</i> 删除</a>
					   				<a href="message-show-hide.php?nid=<?php echo $detail_nid[$i] ?>&status=1" class="modify layui-btn  layui-btn-sm" >显示</a>    
                                    <a href="message-show-hide.php?nid=<?php echo $detail_nid[$i] ?>&status=0" class="modify layui-btn  layui-btn-sm" >隐藏</a>
                               	</td>
                            </tr>
                        
                    <?php } ?>
					  </tbody>
                      </table>

                </div>


                <div class="list-box-function">
                    <div class="page-guide">

                        <?php if($nowpageid==1){?>
                            <span>首页</span>
                            <span>前一页</span>
                        <?php }else{ ?>
                            <a href="detail-list.php?sortby=<?php echo $sort_by; ?>&&sortorder=<?php echo $sort_order; ?>">首页</a>
                            <a href="detail-list.php?nowpageid=<?php echo $prepage; ?>&&sortby=<?php echo $sort_by; ?>&&sortorder=<?php echo $sort_order; ?>">前一页</a>
                        <?php } ?>
                        <?php
                        $ii = 1;
                        $iii = 1;
                        while ($ii <= $page_count) {
                            if($ii==$nowpageid){
                                echo "<span>".$ii."</span>";
                            }else if((($ii+5)<$nowpageid)||(($ii-5)>$nowpageid)){}
                            else{
                                echo "<a href='";

                                echo "detail-list.php?nowpageid=";
                                echo $iii;
                                echo "&&sortby=";
                                echo $sort_by;
                                echo "&&sortorder=";
                                echo $sort_order;
                                echo "'>";
                                echo $iii;
                                echo "</a>";
                            }
                            $ii++;
                            $iii++;
                        }
                        ?>
                        <?php
                        if($nowpageid==$page_count){?>
                            <span>后一页</span>
                            <span>末页</span>
                        <?php }else{ ?>
                            <a href="detail-list.php?nowpageid=<?php echo $nextpage; ?>&&sortby=<?php echo $sort_by; ?>&&sortorder=<?php echo $sort_order; ?>">后一页</a>
                            <a href="detail-list.php?nowpageid=<?php echo $lastpage; ?>&&sortby=<?php echo $sort_by; ?>&&sortorder=<?php echo $sort_order; ?>">末页</a>
                        <? } ?>
                    </div>
                </div>


                <!--list-box end-->
            </div>

            <!--content端點01-->
        </div>
        <!--maincontent端點01-->
        <br class="clearfloat"/>
    </div>
    <!--container端點01-->
</div>

<!--删除box-->
<?php include '../modules/deletebar.php'; ?>
<!--删除box end-->

<?php include  ROOT_PATH_."/controller/modules/footer.php"; ?>
</body>
</html>
